<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}
<div class="subnav">
    <a href="">首页</a> &gt; <a href="">交易管理</a> &gt; 提现订单管理
</div>

<div class="x-body">
	<div id="searchid" class="layui-clear">
		<form name="searchform" class="layui-form" action="?" method="get" >
			<input type="hidden" name="m" value="{$m}" />
			<input type="hidden" name="c" value="{$c}" />
			<input type="hidden" name="a" value="{$a}" />
			<div class="left" style="width:120px;">
				<select name="status"  style="margin-bottom:20px;">
					<option value="0">选择状态</option>
					{loop $statuss as $key => $val}
						{_ !$key && $key = -1}
                    <option value="{$key}"{if $status == $key} selected="selected"{/if} >{$val}</option>
                    {/loop}
				</select>
			</div>
			<div class="left margin-l10">
				<input name="title" id="title" type="text" value="{$title}" class="layui-input" style="width:260px;" placeholder="请输入关键词" />
			</div>
			<div class="left margin-l10">
				<input type="submit" name="search" class="layui-btn" value="搜索" />
			</div>
		</form>
	</div>

    <!--<table class="layui-table"><tr><td id="notice"></td></tr></table>-->
	<table class="layui-table">
		<thead>
			<tr>
				<th>ID</th>
				<th>账号</th>
				<th>银行</th>
				<th>银行卡号</th>
				<th>姓名</th>
				<th>金额</th>
				<th>审核备注</th>
				<th>状态</th>
				<th>时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody id="datalist">
			{loop $data as $val}
			<tr>
				<td>{$val['id']}</td>
				<td><a href="?m={$m}&c={$c}&a={$a}&uid={$val['uid']}">{$val['username']}</a></td>
				<td>{$val['bank']}</td>
				<td>{$val['bankcard']}</td>
				<td>{$val['truename']}</td>
				<td>{$val['money']}</td>
				<td>{$val['notes']}</td>
				<td><span class="span{$val['status']}">{$statuss[$val['status']]}</span></td>
				<td>{date('Y-m-d H:i:s',$val['dateline'])}</td>
				<td>
					{if !$val['status']}
						<a href="?m={$m}&c={$c}&a=add&id={$val['id']}">审核</a>
						{elseif $val['status'] == '1'}
							<a href="javascript:;">提现成功</a>
						{else}
							<a href="javascript:;">提现失败</a>
					{/if}
				</td>
			</tr>
			{/loop}
		<input type="hidden" id="last_id" value="{$lastdata['id']}">
		</tbody>
	</table>
	<div class="layui-clear">
		<div id="pages" class="layui-laypage right">{$multi}</div>		
	</div>
</div>
<script>
		var strUrl = "?m=user&c=ajaxcash&a=checkinfo";
		function pagerefresh(){
			$.ajax({
				type:'post',
				url: strUrl,
				data: {'last_id': $('#last_id').val()},
				cache:false,
				dataType:'json',
				async:true,
				success:function(res){
					if(3 == res.error){
                        layer.msg('<font color="red">'+res.msg+'</font>', {
                            icon: 1,
                            time: 2000 //2秒关闭（如果不配置，默认是3秒）
                        }, function(){
                            location.reload();
                        });
					}
				}
			})
		}
        window.setInterval('pagerefresh()',15000); //指定15秒刷新一次
</script>
</script>

{template index/footer}